package com.static_exce;

/**
 * @Author WaveHi
 * @Date 6/8/2021 下午 3:31
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description 猫猫
 */
public class Cat {

    private static int catNum;//猫的序号

    private String name;//名称
    private int age;//年龄

    public Cat() {

        catNum++;

    }

    public Cat(String name,int age) {

        catNum++;
        this.name = name;
        this.age = age;

    }

    public int getCatNum() {

        return catNum;

    }

    public void setName(String name) {

        this.name = name;

    }

    public String getName() {

        return name;

    }

    public void setAge(int age) {

        this.age = age;

    }

    public int getAge() {

        return age;

    }

    /**
     *  获取猫猫的总数
     * @return 返回猫的总数
     */
    public static int returnCatNum() {

        return catNum;

    }



}
